﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Hkwl.WorldExpo.Merchant.Common;

/// <summary>
///BaseCheckPage 的摘要说明
/// </summary>
public class BaseCheckPage : Page
{
    public BaseCheckPage()
    {
        //
        //TODO: 在此处添加构造函数逻辑
        //
    }

    protected override void InitializeCulture()
    {
        string currentCulture = string.Empty;

        if(!String.IsNullOrEmpty(Request.QueryString["Language"]))
        {
            currentCulture = Request.QueryString["Language"];
            Response.AppendCookie(CommonMethod.CookieNewOperator(currentCulture, "Language"));
        }
        else if (Request.Cookies["Language"] != null)
        {
            currentCulture = Request.Cookies["Language"].Value;
        }
        else
        {
            currentCulture = "zh-cn";
            Response.AppendCookie(CommonMethod.CookieNewOperator(currentCulture, "Language"));
        }

        System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(currentCulture);
        System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture(currentCulture);
    }
}
